// f1.C -- Written on Jun 1st, 2024 by SUN Yazhou
// A comprehensive check on F1 detectors
void f1(){
  TFile *f = new TFile(getenv("TMP1"));
  TDirectory *f1 = (TDirectory *)f->Get("UserAnaTask/f1");

  TCanvas *c = new TCanvas("c", "Plastics @ F1 extracted from ETFAnaUserTask",
    1680, 1050);
  c->Divide(3, 3);
  c->cd(1); ((TH1 *)f1->Get("ht0arrMulti"))->Draw("colz");
  c->cd(2); ((TH1 *)f1->Get("hx_f1"))->Draw("colz");
  c->cd(3); ((TH1 *)f1->Get("hxf1_xETF"))->Draw("colz");
  c->cd(4); ((TH1 *)f1->Get("ht04ud_lr"))->Draw("colz");
  c->cd(5); ((TH1 *)f1->Get("hx04ud_lr"))->Draw("colz");
  c->cd(6); ((TH1 *)f1->Get("hlr_t02_t04"))->Draw("colz");
  c->cd(7); ((TH1 *)f1->Get("hx_f1_lr"))->Draw("colz");
  c->cd(8); ((TH1 *)f1->Get("hx_f1_ud"))->Draw("colz");
  c->cd(9); ((TH1 *)f1->Get("hx_f1_tof1"))->Draw("colz");

  c->Print("f1.pdf");
} // end vis
